home *** CD-ROM | disk | FTP | other *** search
/ PC World 2000 February / PCWorld_2000-02_cd.bin / Software / Vyzkuste / xsetup / _SETUP.2 / Group3 / XQ Control Panel Hide 12.xpl < prev    next >
Text File  |  1999-10-16  |  3KB  |  113 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 3.1"
  2. "TYPE"="6"
  3. "COUNT"="4"
  4. "UIPATH"="Appearance\Control Panel\General Icons"
  5. "NAME"="Visible Items #7"
  6. "VERSION"="1.01"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Display "License manager" applet (NT)"
  9. "TEXT 2"="Display "PCMCIA","Tape" and "SCSI" applets (NT)"
  10. "TEXT 3"="Display "Devices", "Services" and "Server" applets (NT)"
  11. "TEXT 4"="Display "UPS" applet (NT)"
  12. "DESCRIPTION 1"="This plug-in can be used to hide or show the different applets inside Start -> Settings -> Control Panel."
  13. "AUTHOR"="Xteq Systems"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@gmx.net."
  16. "COMMENT 2"="Special thanks to Maxwell (maxwello@hotpop.com) for his brilliant tips and CptSiskoX (CptSiskoX@flashmail.com) for his help."
  17. "COMMENT 3"="See also: MS KB Q207750"
  18.  
  19.  
  20. '******************************************************************
  21. '***                COPY !!!! ONLY EDIT LINES BELOW!!!!        ****
  22. '******************************************************************
  23. sVals=""
  24. sVals2=Array("liccpa.cpl","devapps.cpl","srvmgr.cpl","ups.cpl") 
  25. sVals3=Array("liccpa.cpl","devapps.cpl","srvmgr.cpl","ups.cpl") 
  26. '******************************************************************
  27. '*** Keep an eye on the order (must be the same as "TEXT x") ! ****
  28. '******************************************************************
  29. sPath="HKCU\Control Panel\Don't Load\"
  30. sFile="CONTROL.INI"
  31. sFileSec="Don't Load"
  32.  
  33.  
  34.  
  35. SUB Plugin_Initialize
  36.  if GetWinVer=4 then
  37.     sVals=sVals3
  38.  else
  39.     sVals=sVals2
  40.  end if
  41.  
  42.  for i=0 to UBound(sVals)
  43.      Call ReadIt(i+1,sVals(i)) 
  44.  next 
  45. END SUB
  46.  
  47. Sub ReadIt(ITM,VAL)
  48.   If GetWinVer=2 or GetWinVer=4 then
  49.  
  50.      s=RegReadValue(sPath & VAL)
  51.      if IsEmpty(s)=true then
  52.         Call SetUIElement(ITM,true)
  53.      else
  54.         Call SetUIElement(ITM,false)
  55.      end if
  56.  
  57.   else
  58.  
  59.     s=IniReadValue(sFile,sFileSec,VAL)
  60.     if len(s)>0 then
  61.        Call SetUIElement(ITM,false)
  62.     else
  63.        Call SetUIElement(ITM,true)
  64.     end if
  65.      
  66.   end if
  67.      
  68. End Sub
  69.  
  70. 'Called when the Plugin should validate the Data the user has entered
  71. SUB Plugin_CheckData(ElementIndex)
  72. END SUB
  73.  
  74. 'Called when the Plugin should apply the changes
  75. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  76.  for i=0 to UBound(sVals)
  77.      Call WriteIt(i+1,sVals(i)) 
  78.  next 
  79. END SUB
  80.  
  81. Sub WriteIt(ITM,VAL)
  82.  b=GetUIElement(ITM)
  83.  if b=true then
  84.     'Display it
  85.  
  86.     if GetWinVer=2 or GetWinVer=4 then  
  87.        s=RegReadValue(sPath & VAL)
  88.        if IsEmpty(s)=false then
  89.           Call RegDeleteValue(sPath & VAL)
  90.        end if
  91.     else
  92.        Call IniWriteValue(sFile,sFileSec,VAL,"")
  93.     end if
  94.  
  95.  else
  96.    'Hide it
  97.    
  98.    if GetWinVer=2 or GetWinVer=4 then
  99.       Call RegWriteValue(sPath & VAL,"1",1) 
  100.    else
  101.       Call IniWriteValue(sFile,sFileSec,VAL,"no")
  102.    end if
  103.  
  104.  end if   
  105. End Sub
  106.  
  107.  
  108. 'Called when the Plugin is about to be removed from memory
  109. SUB Plugin_Terminate
  110. END SUB
  111.  
  112.  
  113.